package com.legal.aid.app.domain.vo;


import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 *  用户对话列表对象
 */
public class ChatListVO implements Serializable {

    private static final long serialVersionUID = 1L;

    private String partnerId;

    private Long userId; // 对话用户ID
    private String userName; // 对话用户名
    private String avatar; // 对话用户头像
    private String lastMessage; // 最后一条消息内容

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date sendTime; // 最后一条消息发送时间
    private Integer unreadCount; // 未读消息数量

    public Long getUserId() {
        return userId;
    }

    public String getPartnerId() {
        return partnerId;
    }

    public void setPartnerId(String partnerId) {
        this.partnerId = partnerId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getLastMessage() {
        return lastMessage;
    }

    public void setLastMessage(String lastMessage) {
        this.lastMessage = lastMessage;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    public Integer getUnreadCount() {
        return unreadCount;
    }

    @Override
    public String toString() {
        return "ChatListVO{" +
                "partnerId='" + partnerId + '\'' +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", avatar='" + avatar + '\'' +
                ", lastMessage='" + lastMessage + '\'' +
                ", sendTime=" + sendTime +
                ", unreadCount=" + unreadCount +
                '}';
    }

    public void setUnreadCount(Integer unreadCount) {
        this.unreadCount = unreadCount;
    }

}